//
//  Z_FindingPhotoTableViewCell.m
//  SpaceMovie
//
//  Created by nana on 15/3/18.
//  Copyright (c) 2015年 nana. All rights reserved.
//

#import "Z_FindingPhotoTableViewCell.h"
#import "UIImageView+WebCache.h"
#import "Z_FindingNewModel.h"
#import "Z_FindingNewImageModel.h"

@implementation Z_FindingPhotoTableViewCell
- (void)dealloc
{
    [_PhotoTitle release];
    [_findingImgModel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.PhotoTitle = [[UILabel alloc] initWithFrame:(CGRectMake(3, 15, 300, 35))];
        _PhotoTitle.font = [UIFont systemFontOfSize:22];
        [self.contentView addSubview:_PhotoTitle];
        [_PhotoTitle release];
        
        self.findingImgModel = [[Z_FindingNewModel alloc] init];
        [_findingImgModel release];
        
        
        self.findingNew_img1 = [[UIImageView alloc] initWithFrame:(CGRectMake(3, 50, 120, 103))];
        [self.contentView addSubview:_findingNew_img1];
        [_findingNew_img1 release];
        
        
        self.findingNew_img2 = [[UIImageView alloc] initWithFrame:(CGRectMake(127.5, 50, 120, 103))];
        [self.contentView addSubview:self.findingNew_img2];
        [self.findingNew_img2 release];
        
        
        self.findingNew_img3 = [[UIImageView alloc] initWithFrame:(CGRectMake(252, 50, 120, 103))];
        [self.contentView addSubview:self.findingNew_img3];
        [self.findingNew_img3 release];
        
        
        self.findingNew_time = [[UILabel alloc] initWithFrame:(CGRectMake(3, 160, 90, 20))];
        [self.contentView addSubview:self.findingNew_time];
        [self.findingNew_time release];
        
        self.findingNew_comment = [[UILabel alloc] initWithFrame:(CGRectMake(95, 160, 70, 20))];
        [self.contentView addSubview:self.findingNew_comment];
        [self.findingNew_comment release];
        
        
    }
    return self;
}

- (void)setAllValue2:(Z_FindingNewModel *)model
{
    _PhotoTitle.text = model.findingNew_title;
    [_findingNew_img1 setImageWithURL:[NSURL URLWithString:model.imgModel.findingNewImage_url1]];
    [_findingNew_img2 setImageWithURL:[NSURL URLWithString:model.imgModel.findingNewImage_url2]];
    [_findingNew_img3 setImageWithURL:[NSURL URLWithString:model.imgModel.findingNewImage_url3]];
    NSString *time = [NSString stringWithFormat:@"%@", model.findingNew_publishTime];
    _findingNew_time.text = time;
    NSString *comment = [NSString stringWithFormat:@"评论  %@", model.findingNew_commentCount];
    _findingNew_comment.text = comment;
        
    
    
}








- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
